# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.Compute.V1.Model.PacketIntervals do
  @moduledoc """
  Next free: 7

  ## Attributes

  *   `avgMs` (*type:* `String.t`, *default:* `nil`) - Average observed inter-packet interval in milliseconds.
  *   `duration` (*type:* `String.t`, *default:* `nil`) - From how long ago in the past these intervals were observed.
  *   `maxMs` (*type:* `String.t`, *default:* `nil`) - Maximum observed inter-packet interval in milliseconds.
  *   `minMs` (*type:* `String.t`, *default:* `nil`) - Minimum observed inter-packet interval in milliseconds.
  *   `numIntervals` (*type:* `String.t`, *default:* `nil`) - Number of inter-packet intervals from which these statistics were derived.
  *   `type` (*type:* `String.t`, *default:* `nil`) - The type of packets for which inter-packet intervals were computed.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :avgMs => String.t() | nil,
          :duration => String.t() | nil,
          :maxMs => String.t() | nil,
          :minMs => String.t() | nil,
          :numIntervals => String.t() | nil,
          :type => String.t() | nil
        }

  field(:avgMs)
  field(:duration)
  field(:maxMs)
  field(:minMs)
  field(:numIntervals)
  field(:type)
end

defimpl Poison.Decoder, for: GoogleApi.Compute.V1.Model.PacketIntervals do
  def decode(value, options) do
    GoogleApi.Compute.V1.Model.PacketIntervals.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Compute.V1.Model.PacketIntervals do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
